Mastering Apex Programming by Paul Battisson

Mastering Apex Programming by Paul Battisson

Author:Paul Battisson
Language: eng
Format: epub, mobi
Publisher: Packt Publishing Pvt Ltd
Published: 2020-11-20T00:00:00+00:00


public List<Account> accs;

public ExampleQueueable(List<Account> scope) {

accs = scope;

}

public void execute(QueueableContext context) {

//Process accs

}

}

This is similar to how we would define a future method, a single method (in this case, always called execute) that is invoked asynchronously, however, instead of the method being separated from any state, we can now define the state through the use of member variables that allow us a far greater degree of control. Note that the ExampleQueueable class is like any other Apex class and so can have complex Apex types as member variables should the developer wish to pass some custom data state to the queueable job. Refer to the following code block:

public class ExampleQueueable implements Queueable {



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.